package com.mkyong.editor;

import javax.faces.bean.ManagedBean;
import javax.faces.bean.SessionScoped;

import org.primefaces.component.tabview.Tab;
import org.primefaces.component.tabview.TabView;

@ManagedBean(name="tabViewAdd")
@SessionScoped
public class TabViewAdd {
	private TabView tabView;

	public TabView getTabView() {
		return tabView;
	}

	public void setTabView(TabView tabView) {
		this.tabView = tabView;
	}

	public TabViewAdd() {
		// generate tabs by code
		tabView = new TabView();
		Tab tab1 = new Tab();
		tab1.setTitle("Business Partner");
		Tab tab2 = new Tab();
		tab2.setTitle("Manage Favorites");
		tabView.getChildren().add(tab1);
		tabView.getChildren().add(tab2);
	}
}
